package com.rain.rainspringboot3.encryption.service;

import com.rain.rainspringboot3.encryption.entity.SensitiveData;

/**
 * @author rain
 */
public interface SensitiveDataService {

    boolean saveData(SensitiveData sensitiveData);

    SensitiveData getByCipherText(String cipherText);

    SensitiveData getById(Long sensitiveDataId);

    /**
     * 根据前缀和后缀和明文获取敏感数据,只针对滑动脱敏
     * @param prefix 前缀
     * @param suffix 后缀
     * @param plainText 明文
     * @return 敏感数据
     */
    SensitiveData getByPrefixAndSuffixAndCipherText(String prefix, String suffix, String plainText);
}
